package webcomponents;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.AfterTest;

public class CheckBoxesTest {
	//Define webdriver
	WebDriver driver = new FirefoxDriver();
	//Access to the webpage 
  @BeforeTest
  public void beforeTest() {
	  
	  String baseUrl = "http://www.echoecho.com/htmlforms09.htm";
	  driver.get(baseUrl);  
	  driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
  }
  //Close browser
  @AfterTest
  public void afterTest() {
	  
	  driver.close();
  }

  //Test Checkboxes
  @Test
  public void clickCheckboxes() {
	
	CheckBoxes checkBoxes = PageFactory.initElements(driver, CheckBoxes.class);
	checkBoxes.clickCheckboxes();

  }
  
}
